<template>
    <div class="mine-page">
        <!-- 顶部渐变背景 -->
        <div class="mine-header">
            <div class="mine-header__user-icon">
                <i class="iconfont">&#xe6a7;</i>
            </div>
            <div class="mine-header__avatar">
                <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="头像" />
            </div>
            <div class="mine-header__card">
                <div class="mine-header__name">
                    热心市民李先生
                    <span class="mine-header__vip">
                        <i class="iconfont">&#xe60b;</i>16
                    </span>
                </div>
                <div class="mine-header__id">ID: 1069643013</div>
                <div class="mine-header__assets">
                    <div>
                        <div class="assets-label">红包</div>
                        <div class="assets-value">218</div>
                    </div>
                    <div>
                        <div class="assets-label">优惠券</div>
                        <div class="assets-value">12张</div>
                    </div>
                    <div>
                        <div class="assets-label">鲜豆</div>
                        <div class="assets-value">88</div>
                    </div>
                    <div>
                        <div class="assets-label">白条</div>
                        <div class="assets-value">1000</div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 功能列表 -->
        <div class="mine-list">
            <div class="mine-list__item">
                <i class="iconfont red">&#xe601;</i>
                <span>我的钱包</span>
                <i class="iconfont arrow">&#xe6a3;</i>
            </div>
            <div class="mine-list__item">
                <i class="iconfont blue">&#xe602;</i>
                <span>我的地址</span>
                <i class="iconfont arrow">&#xe6a3;</i>
            </div>
            <div class="mine-list__item">
                <i class="iconfont purple">&#xe603;</i>
                <span>客服与帮助</span>
                <i class="iconfont arrow">&#xe6a3;</i>
            </div>
        </div>
    </div>
</template>

<script setup>
// 这里可以根据需要添加逻辑
</script>

<style lang="scss" scoped>
.mine-page {
    min-height: 100vh;
    background: #f7f7f7;
    padding-bottom: 32px;
}

/* 顶部渐变背景 */
.mine-header {
    position: relative;
    height: 260px;
    background: linear-gradient(120deg, #3bb2fe 0%, #5ec8fe 100%);
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;

    .mine-header__user-icon {
        position: absolute;
        top: 24px;
        right: 32px;
        color: #fff;
        font-size: 28px;
        z-index: 2;
    }

    .mine-header__avatar {
        position: absolute;
        left: 50%;
        top: 36px;
        transform: translateX(-50%);
        width: 96px;
        height: 96px;
        border-radius: 50%;
        overflow: hidden;
        border: 5px solid #fff;
        z-index: 2;
        background: #fff;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    .mine-header__card {
        position: absolute;
        left: 50%;
        top: 120px;
        transform: translateX(-50%);
        width: 88%;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        padding: 56px 0 20px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 1;

        .mine-header__name {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            justify-content: center;

            .mine-header__vip {
                background: #eaf7d3;
                color: #8bc34a;
                border-radius: 12px;
                font-size: 13px;
                padding: 2px 8px;
                margin-left: 10px;
                display: flex;
                align-items: center;

                i {
                    font-size: 15px;
                    margin-right: 2px;
                }
            }
        }

        .mine-header__id {
            color: #bbb;
            font-size: 15px;
            margin-bottom: 18px;
        }

        .mine-header__assets {
            display: flex;
            width: 100%;
            border-top: 1px solid #f0f0f0;
            padding-top: 14px;
            justify-content: space-around;

            >div {
                flex: 1;
                text-align: center;

                .assets-label {
                    color: #bbb;
                    font-size: 15px;
                    margin-bottom: 2px;
                }

                .assets-value {
                    font-size: 20px;
                    font-weight: bold;
                    color: #222;
                }
            }
        }
    }
}

/* 功能列表 */
.mine-list {
    margin: 120px 18px 0 18px;

    .mine-list__item {
        background: #fff;
        border-radius: 16px;
        display: flex;
        align-items: center;
        padding: 18px 18px;
        margin-bottom: 16px;
        font-size: 18px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

        .iconfont {
            font-size: 24px;
            margin-right: 14px;

            &.red {
                color: #ff5a5f;
            }

            &.blue {
                color: #3bb2fe;
            }

            &.purple {
                color: #a259ff;
            }

            &.arrow {
                margin-left: auto;
                color: #bbb;
                font-size: 20px;
            }
        }
    }
}
</style>